HTMLify
style.css
Views: 16 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | body { background: #000; display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; } .container { position: relative; width: 250px; height: 250px; animation: rotate 4s ease-out infinite; filter: url("#gooey"); } @keyframes rotate { 0% { transform: rotate(360deg); } 50% { transform: rotate(360deg); } 100% { transform: rotate(0deg); } } .container .liquid { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: linear-gradient(45deg, #c7eeff, #03a9f4); width: 80px; height: 80px; border-radius: 50%; --ani_dur: 4s; } .container .liquid:nth-child(1) { top: 0; animation: animate1 var(--ani_dur) linear infinite; } .container .liquid:nth-child(2) { left: 0; animation: animate2 var(--ani_dur) linear infinite; } .container .liquid:nth-child(3) { left: 100%; animation: animate3 var(--ani_dur) linear infinite; } .container .liquid:nth-child(4) { top: 100%; animation: animate4 var(--ani_dur) linear infinite; } @keyframes animate1 { 0% { top: 0; } 50% { top: 100%; } 100% { top: 100%; } } @keyframes animate2 { 0% { left: 0; } 50% { left: 100%; } 100% { left: 100%; } } @keyframes animate3 { 0% { left: 100%; } 50% { left: 0; } 100% { left: 0; } } @keyframes animate4 { 0% { top: 100%; } 50% { top: 0; } 100% { top: 0; } } svg { width: 0; height: 0; } |